#pragma once
#include <stdexcept>
#include "universal.h"

class Node {
public:
    Node(int& val) {
        _val = val;
        _next = nullptr;
    }

    int _val;
    Node* _next;
};

class LinkedList {
public:
    LinkedList();

    ~LinkedList();

    void InsertAtTail(int val);

    void InsertAtHead(int val);

    bool DeleteAtBack();

    bool DeleteAtHead();

    bool Contains(int val);

    int FindAt(int pos);

    int Head();

    int Tail();

    void Print();

private:
    Node* _head;
    int _size;
};